home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 271_02 / rmwhite.doc < prev    next >
Text File  |  1987-08-16  |  1KB  |  45 lines

  1.  
  2.  
  3.         NAME
  4.                 rmlead -- remove leading whitespace from string
  5.                 rmtrail --  "    trailing    "       "     "
  6.                 rmallws --  "    all         "       "     "
  7.  
  8.         SYNOPSIS
  9.                 (void) rmlead(str);
  10.                 (void) rmtrail(str);
  11.                 (void) rmallws(str);
  12.                 char *str;     string to modify
  13.  
  14.  
  15.         DESCRIPTION
  16.         These string functions will modify the specified string
  17.         in place.  White space is defined as the space character,
  18.         tab character, vertical tab, linefeed, carriage return,
  19.         and formfeed.  String size is limited to 255 characters,
  20.         although the source code can be modified to increase or
  21.         decrease that.  If the string exceeds that size, it is
  22.         truncated.
  23.  
  24.  
  25.  
  26.         EXAMPLE
  27.  
  28.             char string[] = "   This is a string   \n";
  29.  
  30.             rmhead(string);  /* returns "This is a string   \n" */
  31.             rmtail(string);  /* returns "   This is a string" */
  32.             rmallws(string); /* returns "Thisisastring" */
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.         This function is found in SMTCx.LIB for the Turbo-C Compiler.
  45.